home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / gnu / gnulib / libsrc98.zoo / Makefile < prev    next >
Makefile  |  1993-11-05  |  3KB  |  182 lines

  1. #
  2. # Top level Makefile for TOS-Gcc library
  3. #
  4.  
  5. # GCC configuration info...
  6.  
  7. # Leave the next line undefined for native compilation setup.
  8. CROSSDIR := /net/acae127/home/bammi/atari/cross-gcc
  9.  
  10. # Define MINTFLAG when compiling mntlib
  11. # MINTFLAG := -mint
  12.  
  13. ifdef MINTFLAG
  14. MINTOPT := -mint
  15. else
  16. MINTOPT :=
  17. endif
  18.  
  19. ifdef CROSSDIR
  20.  
  21. # Set up to do cross-compiling...
  22.  
  23. CROSSLIB := $(CROSSDIR)/lib
  24. CROSSBIN := $(CROSSDIR)/bin
  25.  
  26. AR    := $(CROSSBIN)/car
  27. AS     := cgcc $(MINTOPT)
  28. CC    := cgcc $(MINTOPT)
  29. LIB     := $(CROSSLIB)
  30. VPATH   := ../co
  31.  
  32. else
  33.  
  34. # Set up to run native...
  35.  
  36. AR    := gcc-ar
  37. AS    := gcc $(MINTOPT)
  38. CC    := gcc $(MINTOPT)
  39. LIB    := d:\gnu\lib
  40.  
  41. endif
  42.  
  43. # Flags for extra 'long long' support under newer gcc's
  44. #LONGLONG=-DPRINTF_LONGLONG
  45.  
  46. # Additional options for compiling C code
  47.  
  48. XFLAGS := -I../co -Wall -Wmissing-prototypes -Wstrict-prototypes
  49.  
  50. # Dynamic selection of options for each target library...
  51.  
  52. ifneq (,$(findstring debug,$(TARGET)))
  53. OPTIM= -O -g -Wstrict-prototypes
  54. FRAME=
  55. DEBUG=
  56. g=g
  57. else
  58. OPTIM= -O2 -fstrength-reduce
  59. FRAME= -fomit-frame-pointer
  60. DEBUG= -DNDEBUG
  61. g=
  62. endif
  63.  
  64. ifneq (,$(findstring long-int,$(TARGET)))
  65. SHORT=
  66. DSHORT=
  67. ST=
  68. else
  69. SHORT= -mshort
  70. DSHORT= -DSHORTLIB
  71. ST=16
  72. endif
  73.  
  74. ifneq (,$(findstring 68020,$(TARGET)))
  75. CC := $(CC) -m68020 -m68881
  76. endif
  77.  
  78. ifneq (,$(findstring baserel,$(TARGET)))
  79. CC := $(CC) -mbaserel
  80. b=b
  81. else
  82. b=
  83. endif
  84.  
  85. # common subset of options; no int size or omit-frame-pointer:
  86. COPTS= $(DEBUG) $(OPTIM) $(XFLAGS)
  87.  
  88. # Base options CC; includes int size but not omit-frame-pointer
  89. CFFLAGS = $(SHORT) $(COPTS)
  90.  
  91. # normal CFLAGS including int size and omit-frame-pointer
  92. CFLAGS= $(CFFLAGS) $(FRAME) $(LONGLONG)
  93.  
  94. # cflags for stuff that needs to be compiled with 32 bit ints
  95. CLFLAGS= $(COPTS) $(FRAME) $(DSHORT)
  96.  
  97. # flags to $(CC) when it runs the assembler only
  98. ASFLAGS= -c
  99.  
  100. # flags to $(CC) when running preprocessor and assembler
  101. PPFLAGS= $(XPFLAGS) $(SHORT) $(SFPFLAG) -P -c
  102.  
  103. # library targets
  104. ifdef MINTFLAG
  105.  
  106. CLIB= $bmint$g$(SFP)$(ST).olb
  107. CLIB020=$bmint$g$(SFP)$(ST)020.olb
  108. IIOLIB= $bmiio$g$(SFP)$(ST).olb
  109. CRT0=$bmcrt0.o
  110. GCRT0=$bmgcrt0.o
  111.  
  112. else
  113.  
  114. CLIB= $bgnu$g$(SFP)$(ST).olb
  115. CLIB020=$bgnu$g$(SFP)$(ST)020.olb
  116. IIOLIB= $biio$g$(SFP)$(ST).olb
  117. CRT0=$bcrt0.o
  118. GCRT0=$bgcrt0.o
  119.  
  120. endif
  121.  
  122. STARTO= $(CRT0) $(GCRT0)
  123.  
  124. # the stuff to make
  125. ALL= $(CLIB) $(IIOLIB) $(STARTO)
  126. ALL020 = $(CLIB020) $(STARTO)
  127.  
  128. #all: lshort llong lgshort lglong
  129. top: lshort llong
  130. #top: l020short l020long l020bshort l020blong
  131.  
  132. lshort:
  133.     $(MAKE) clean
  134.     $(MAKE) install
  135.  
  136. llong:
  137.     $(MAKE) clean
  138.     $(MAKE) install TARGET="long-int"
  139.  
  140. lgshort:
  141.     $(MAKE) clean
  142.     $(MAKE) install TARGET=debug
  143.  
  144. lglong:
  145.     $(MAKE) clean
  146.     $(MAKE) install TARGET="long-int debug"
  147.  
  148. l020short:
  149.     $(MAKE) clean
  150.     $(MAKE) install TARGET=68020
  151. #    $(MAKE) install020 TARGET=68020
  152.  
  153. l020long:
  154.     $(MAKE) clean
  155.     $(MAKE) install TARGET="68020 long-int"
  156. #    $(MAKE) install020 TARGET="68020 long-int"
  157.  
  158. lbshort:
  159.     $(MAKE) clean
  160.     $(MAKE) install TARGET="baserel"
  161.  
  162. lblong:
  163.     $(MAKE) clean
  164.     $(MAKE) install TARGET="long-int baserel"
  165.  
  166. l020bshort:
  167.     $(MAKE) clean
  168.     $(MAKE) install TARGET="68020 baserel"
  169.  
  170. l020blong:
  171.     $(MAKE) clean
  172.     $(MAKE) install TARGET="68020 long-int baserel"
  173.  
  174. realclean:
  175.     rm -f *.o *.olb
  176.     rm -f core report
  177.  
  178. # Get the rules to build everything...
  179.  
  180. include mincl
  181.